{if !$bIsShowResults}
    <div style="padding:30px;font-size:10pt;" class="color">
    <div style="font-size:8pt;" class="color"><b>{language text="please_read_first_on_how_to_submit"}</b>
    <ol>
        <li>{language text="_quiz_title_questions_and_answers_s"}</li>
        <li>{language text="you_should_enter_at_least_one_up_to"}</li>
        <li>{language text="each_question_is_marked_with_a_numb"}</li>
        <li>{language text="once_you_have_succesfully_submited"}</li>
    </ol>
    </div>
    <br />
    <br />

    {messages block="AddQuiz"}

    <form method="post" action="{$sUrl}" name="form">
    <div style="font-size:8pt;">
        <div style="padding:10px;" class="border13">
            <b>{language text="quiz_title"}</b>
            <br/><br/>
            <input type="text" name="title" value="{$aQuizData.title}" size="50" maxlength="100" onfocus="this.className='inputmain';" onblur="this.className='';" />
            <br/><br/>
        </div>
        <br/>
    {foreach from=$aQuizData.questions item=sQuestion key=iNum}
    <!-- START QUESTION {$iNum}-->
    <div class="border2">
        <div class="border13">
            <div style="padding:5px;">
                <div style="padding:5px;"><b>{language text="question"} {$iNum}</b></div>
                <div style="padding:5px;"><input type="text" name="aQuestion[{$iNum}]" value="{$sQuestion}" size="40" maxlength="100" onfocus="this.className='inputmain';" onblur="this.className='';" /></div>
            </div>
         </div>
         <br/>

        <div style="padding-left:20px;">
            <div><b>{language text="correct_answer"}</b></div>
            <div><input type="text" name="aAnswer{$iNum}[1]" value="{$aQuizData.answers[$iNum][1]}" size="30"  maxlength="50"  style="vertical-align:top;"  onfocus="this.className='inputmain';" onblur="this.className='';"  /></div>
            <br/>
            <div>{language text="answer_two"}</div>
            <div><input type="text" name="aAnswer{$iNum}[2]" value="{$aQuizData.answers[$iNum][2]}" size="30" maxlength="50"  style="vertical-align:top;"  onfocus="this.className='inputmain';" onblur="this.className='';" /></div>
            <br/>
            <div>{language text="answer_three"}</div>
            <div><input type="text" name="aAnswer{$iNum}[3]" value="{$aQuizData.answers[$iNum][3]}" size="30" maxlength="50"  style="vertical-align:top;"  onfocus="this.className='inputmain';" onblur="this.className='';" /></div>
            <br/>
            <div>{language text="answer_four"}</div>
            <div><input type="text" name="aAnswer{$iNum}[4]" value="{$aQuizData.answers[$iNum][4]}" size="30" maxlength="50"  style="vertical-align:top;"  onfocus="this.className='inputmain';" onblur="this.className='';" /></div>
        </div>
    <!-- END QUESTION {$iNum}-->
    <br/>
    </div>
    <br/>

    {/foreach}
    </div>
    <br />
    <div style="text-align:center;"><input type="submit" name="act[quiz_add]" value="{language text="submit_your_quiz"}" style="cursor:pointer;" class="mainmenu6" onmouseover="this.className='mainmenu7';" onmouseout="this.className='mainmenu6';" /></div>
    </form>
    </div>

{else}
<table style="width:100%;" cellpadding="8" cellspacing="4">
    <tr>
        <td class="color" style="font-size:8pt;">
            {str_replace text="`thanks_auser_user_for_submitting_yo`" aUser_user="`$aUser.user`" }<br />
            <br /><br />
            <b>{$aQuizData.title|escape}</b>
            <br /><br />
            {assign var='iPos' value=0}
            {foreach from=$aQuizData.questions item=sQuestion key=iQuestion}
                {if $sQuestion}
                {assign var='iPos' value=$iPos+1}
                <div>{$iPos}. {$sQuestion|escape}</div>
                <br />
                <div style="padding-left:20px;">
                {foreach from=$aQuizData.answers[$iQuestion] item=sAnswer name=answers}
                {if 1 == $smarty.foreach.answers.iteration}
                    <b>{$sAnswer|escape}</b>
                {else}
                    {$sAnswer|escape}
                {/if}
                <br />
                {/foreach}
                </div>
                <br />
                {/if}
            {/foreach}

        </td>

    </tr>
</table>
{/if}